<template>
    <view class="detail-container">
        <view class="detail-title">盒子 {{ id }} 的详情页</view>
        <view class="detail-content">
            <!-- 这里可以根据 id 展示不同内容 -->
            <text>这是第 {{ id }} 个盒子的专属内容！</text>
        </view>
        <button class="back-btn" @click="$emit('close')">返回</button>
    </view>
</template>

<script>
export default {
    name: 'Page1',
    props: {
        id: Number,
    }
}
</script>

<style scoped lang="scss">
.detail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.detail-title {
    font-size: 40rpx;
    color: #409eff;
    margin-bottom: 30rpx;
}

.detail-content {
    font-size: 32rpx;
    margin-bottom: 50rpx;
}

.back-btn {
    background: #67c23a;
    color: #fff;
    border: none;
    border-radius: 8rpx;
    padding: 18rpx 40rpx;
    font-size: 32rpx;
}

.back-btn:active {
    background: #5daf34;
}
</style>
